package com.qmmessage.sdk.common.http;

/**
 * @author qm
 */
public class HttpResponse {
    private Integer code;
    private Boolean success;
    private String body;

    public static HttpResponse errResponse(Integer code, String body) {
        return new HttpResponse(code, false, body);
    }

    public static HttpResponse successResponse(String body) {
        return new HttpResponse(200, true, body);
    }

    public HttpResponse(Integer code, Boolean success, String body) {
        this.code = code;
        this.success = success;
        this.body = body;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public Boolean getSuccess() {
        return success;
    }

    public void setSuccess(Boolean success) {
        this.success = success;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }
}
